package com.luo.chengrui.module.sa.controller.admin.datapermission.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 用来定义哪些业务表用来做权限控制，如部门表、费用科目、项目表。一般用来控制权限的都是基础数据表。 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class DataPermissionDefineBaseVO {

    @Schema(description = "表名", example = "system_dept")
    private String tableName;

    @Schema(description = "表备注")
    private String tableDesc;

    @Schema(description = "主键字段名", example = "id")
    private String primaryKeyName;

    @Schema(description = "备注字段名")
    private String nameKey;

    @Schema(description = "父节点字段名", example = "parent_id")
    private String parentIdKeyName;

    @Schema(description = "外键字段名", example = "dept_id")
    private String foreignKeyName;


    @Schema(description = "根节点的值", example = "root_id")
    private String rootId;

    @Schema(description = "取数脚本", example = "sql_script")
    private String sqlScript;

    @Schema(description = "是否数据库表", example = "is_db_table")
    private Integer isDbTable;

    @Schema(description = "乐观锁")
    private Long version;

}
